Skip to content

docs: add shorn to the ecosystem page - #1649

Open
ChiChuRita wants to merge 1 commit into
arktypeio:mainfrom
ChiChuRita:ecosystem-shorn
Open

docs: add shorn to the ecosystem page#1649
ChiChuRita wants to merge 1 commit into
arktypeio:mainfrom
ChiChuRita:ecosystem-shorn

Conversation

@ChiChuRita

Copy link
Copy Markdown

Adds a ### shorn section to the ecosystem page, after DRZL, and the matching entry in meta.json.

shorn uses an ArkType type as a binary wire format. The Person type in the example holds a record that is 35 bytes of minified JSON and 8 bytes through shorn. Field names and type tags stay off the wire because the type already carries them, so there is no IDL and nothing to generate.

Nothing in shorn is ArkType-specific. It reads Standard Schema for validation and Standard JSON Schema for structure, which is why 2.1.28 is the floor. Golden test vectors pin the exact bytes across ArkType, Zod and Valibot, so equivalent types in any of the three encode identically. The one ArkType-shaped detail is open objects: since ArkType does not emit additionalProperties: false, shorn checks for undeclared properties at encode time and rejects them instead of silently dropping data. That is what the closing note covers.

Docs: https://shorn.dev
ArkType guide: https://shorn.dev/validators/arktype/
Repo: https://github.com/ChiChuRita/shorn
npm: @chichurita/shorn

Worth flagging: shorn is at 0.1.0 and describes itself as experimental. The wire format is not frozen until 1.0. If the page is meant for stable libraries only, I am happy to close this and open it again later.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes

  • ark/docs/content/docs/ecosystem/index.mdx — adds a ### shorn section (after DRZL) with a prose intro, a // @noErrors ArkType example, and a closing callout about open objects / "+": "delete".
  • ark/docs/content/docs/ecosystem/meta.json — appends the [shorn](/docs/ecosystem#shorn) entry to the pages array.

I verified every substantive claim rather than taking them on trust:

  • The "ArkType 2.1.28 and newer implements both Standard Schema and Standard JSON Schema" floor matches the ark/type CHANGELOG (2.1.28: "Standard Schema is now a valid definition" + "Adds support for the new Standard JSON Schema interface").
  • The claim that ArkType omits additionalProperties: false for object JSON Schema output matches the ~standard.jsonSchema/toJsonSchema() test snapshots (objects emit properties + required only).
  • The section and meta.json entry follow the page's established structure and naming conventions (heading → lowercased anchor, // @noErrors decorator, tab-indented object props).
  • The example code compiles against ArkType/CSS syntax (number.integer >= 0, "'M' | 'F' | 'X'"), and shorn's public docs confirm the encode/decode API, the Standard Schema + Standard JSON Schema mechanism, the 2.1.28 floor, the "+": "delete" guidance, and the "8 bytes vs 35 bytes JSON" figures.

ℹ️ Experimental library placement

shorn is at 0.1.0 with a wire format that isn't frozen until 1.0. The author already flagged this and offered to close the PR if the ecosystem page is meant for stable libraries only. Nothing in the docs is inaccurate or misrepresented on this point, but the maintainers should consciously decide whether to feature an experimental serialization format whose encoded bytes are not yet stable — a reader who adopts it now will need to re-encode data after 1.0. This is a policy call for the maintainers, not a defect in the PR.

Pullfrog  | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: To do

Development

Successfully merging this pull request may close these issues.

1 participant